namespace SmartSoft.Lists
{
    using SmartSoft;
    using SmartSoft.Controls;
    using SmartSoft.Properties;
    using SmartSoft.ADP;
    using System;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Windows.Forms;

    public class FormDmNvEditor : FormListEditor
    {
        private IContainer components;
        private GBoxControl gBoxControl1;
        private GBoxControl gBoxControl3;
        private bool ib_PictureChanged;
        private string is_PicturePath;
        private LabelControl lblDia_Chi;
        private LabelControl lblEmail;
        private LabelControl lblMa_Bp;
        private LabelControl lblMa_Nv;
        private LabelControl lblMobiles;
        private LabelControl lblPhones;
        private LabelControl lblTen_Nv;
        private System.Windows.Forms.PictureBox PictureBox;
        private Panel pnlPicture;
        private TextControl txtDia_Chi;
        private TextControl txtDia_Chi_E;
        private TextControl txtEmail;
        private TextSearch txtMa_Bp;
        private TextControl txtMa_Nv;
        private TextControl txtMobiles;
        private TextControl txtPhones;
        private TextControl txtTen_Bp;
        private TextControl txtTen_Nv;
        private TextControl txtTen_Nv_E;

        public FormDmNvEditor()
        {
            this.InitializeComponent();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            //ComponentResourceManager manager = new ComponentResourceManager(typeof(FormDmNvEditor));
            this.txtMa_Nv = new TextControl();
            this.lblMa_Nv = new LabelControl();
            this.txtTen_Nv = new TextControl();
            this.lblTen_Nv = new LabelControl();
            this.pnlPicture = new Panel();
            this.PictureBox = new System.Windows.Forms.PictureBox();
            this.gBoxControl1 = new GBoxControl();
            this.txtDia_Chi = new TextControl();
            this.lblDia_Chi = new LabelControl();
            this.txtPhones = new TextControl();
            this.lblPhones = new LabelControl();
            this.gBoxControl3 = new GBoxControl();
            this.txtDia_Chi_E = new TextControl();
            this.txtTen_Nv_E = new TextControl();
            this.lblEmail = new LabelControl();
            this.txtEmail = new TextControl();
            this.lblMa_Bp = new LabelControl();
            this.txtMa_Bp = new TextSearch();
            this.txtTen_Bp = new TextControl();
            this.txtMobiles = new TextControl();
            this.lblMobiles = new LabelControl();
            this.pnlPicture.SuspendLayout();
            ((ISupportInitialize) this.PictureBox).BeginInit();
            this.gBoxControl1.SuspendLayout();
            this.gBoxControl3.SuspendLayout();
            base.SuspendLayout();
            base.txtMa_Loai3.FirstFilter = "Type = 'ST3'";
            base.txtMa_Loai3.Location = new Point(0x1fb, 0x19d);
            base.txtMa_Loai3.Size = new Size(0xbc, 20);
            base.txtMa_Loai3.TabIndex = 9;
            base.txtMa_Loai2.FirstFilter = "Type = 'ST2'";
            base.txtMa_Loai2.Location = new Point(0x13a, 0x19d);
            base.txtMa_Loai2.Size = new Size(190, 20);
            base.txtMa_Loai2.TabIndex = 8;
            base.txtMa_Loai1.FirstFilter = "Type = 'ST1'";
            base.txtMa_Loai1.Location = new Point(0x7b, 0x19d);
            base.txtMa_Loai1.Size = new Size(0xbc, 20);
            base.txtMa_Loai1.TabIndex = 7;
            base.lblPhan_Loai.Location = new Point(12, 0x1a0);
            this.txtMa_Nv.CharacterCasing = CharacterCasing.Upper;
            this.txtMa_Nv.CheckTextSearched = false;
            this.txtMa_Nv.DisabledForeColor = Color.Empty;
            this.txtMa_Nv.Font = new Font("Arial", 8.25f);
            this.txtMa_Nv.Location = new Point(0x7b, 0x1c);
            this.txtMa_Nv.MaxLength = 0x20;
            this.txtMa_Nv.Name = "txtMa_Nv";
            this.txtMa_Nv.OldValue = null;
            this.txtMa_Nv.Size = new Size(100, 20);
            this.txtMa_Nv.TabIndex = 0;
            this.txtMa_Nv.UserTextLength = AppInstance.TextControlLength.ItemCode;
            this.txtMa_Nv.UserTrimMode = AppInstance.TextControlTrimMode.All;
//            this.txtMa_Nv.Value = null;//manager.GetObject("txtMa_Nv.Value");
            this.lblMa_Nv.AutoSize = true;
            this.lblMa_Nv.Font = new Font("Arial", 8.25f);
            this.lblMa_Nv.Location = new Point(12, 0x1f);
            this.lblMa_Nv.Name = "lblMa_Nv";
            this.lblMa_Nv.Size = new Size(0x47, 14);
            this.lblMa_Nv.TabIndex = 4;
            this.lblMa_Nv.Text = "Mã nhân viên";
            this.txtTen_Nv.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.txtTen_Nv.CheckTextSearched = false;
            this.txtTen_Nv.DisabledForeColor = Color.Empty;
            this.txtTen_Nv.Font = new Font("Arial", 8.25f);
            this.txtTen_Nv.Location = new Point(6, 0x13);
            this.txtTen_Nv.MaxLength = 0x80;
            this.txtTen_Nv.Name = "txtTen_Nv";
            this.txtTen_Nv.OldValue = null;
            this.txtTen_Nv.Size = new Size(0x111, 20);
            this.txtTen_Nv.TabIndex = 0;
            this.txtTen_Nv.UserTextLength = AppInstance.TextControlLength.ItemDescription;
            this.txtTen_Nv.UserTrimMode = AppInstance.TextControlTrimMode.All;
//            this.txtTen_Nv.Value = null;//manager.GetObject("txtTen_Nv.Value");
            this.lblTen_Nv.AutoSize = true;
            this.lblTen_Nv.Font = new Font("Arial", 8.25f);
            this.lblTen_Nv.Location = new Point(12, 0x4c);
            this.lblTen_Nv.Name = "lblTen_Nv";
            this.lblTen_Nv.Size = new Size(0x4b, 14);
            this.lblTen_Nv.TabIndex = 4;
            this.lblTen_Nv.Text = "Tên nhân viên";
            this.pnlPicture.BackColor = SystemColors.Desktop;
            this.pnlPicture.BorderStyle = BorderStyle.Fixed3D;
            this.pnlPicture.Controls.Add(this.PictureBox);
            this.pnlPicture.Location = new Point(0x1d4, 0xad);
            this.pnlPicture.Name = "pnlPicture";
            this.pnlPicture.Size = new Size(0xe3, 0xc1);
            this.pnlPicture.TabIndex = 12;
            this.PictureBox.BackgroundImage = Resources.NoPicture;
            this.PictureBox.BackgroundImageLayout = ImageLayout.Stretch;
            this.PictureBox.Location = new Point(3, 3);
            this.PictureBox.Name = "PictureBox";
            this.PictureBox.Size = new Size(0xd9, 0xb7);
            this.PictureBox.SizeMode = PictureBoxSizeMode.StretchImage;
            this.PictureBox.TabIndex = 0;
            this.PictureBox.TabStop = false;
            this.PictureBox.DoubleClick += new EventHandler(this.PictureBox_DoubleClick);
            this.gBoxControl1.Controls.Add(this.txtDia_Chi);
            this.gBoxControl1.Controls.Add(this.txtTen_Nv);
            this.gBoxControl1.Font = new Font("Arial", 8.25f);
            this.gBoxControl1.Location = new Point(0x75, 0x36);
            this.gBoxControl1.Name = "gBoxControl1";
            this.gBoxControl1.Size = new Size(0x11d, 0x43);
            this.gBoxControl1.TabIndex = 1;
            this.gBoxControl1.TabStop = false;
            this.gBoxControl1.Text = "Tiếng Việt";
            this.txtDia_Chi.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.txtDia_Chi.CheckTextSearched = false;
            this.txtDia_Chi.DisabledForeColor = Color.Empty;
            this.txtDia_Chi.Font = new Font("Arial", 8.25f);
            this.txtDia_Chi.Location = new Point(6, 0x29);
            this.txtDia_Chi.MaxLength = 0x80;
            this.txtDia_Chi.Name = "txtDia_Chi";
            this.txtDia_Chi.OldValue = null;
            this.txtDia_Chi.Size = new Size(0x111, 20);
            this.txtDia_Chi.TabIndex = 1;
            this.txtDia_Chi.UserTextLength = AppInstance.TextControlLength.ItemDescription;
            this.txtDia_Chi.UserTrimMode = AppInstance.TextControlTrimMode.All;
//            this.txtDia_Chi.Value = null;//manager.GetObject("txtDia_Chi.Value");
            this.lblDia_Chi.AutoSize = true;
            this.lblDia_Chi.Font = new Font("Arial", 8.25f);
            this.lblDia_Chi.Location = new Point(12, 0x62);
            this.lblDia_Chi.Name = "lblDia_Chi";
            this.lblDia_Chi.Size = new Size(40, 14);
            this.lblDia_Chi.TabIndex = 4;
            this.lblDia_Chi.Text = "Địa chỉ";
            this.txtPhones.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.txtPhones.CheckTextSearched = false;
            this.txtPhones.DisabledForeColor = Color.Empty;
            this.txtPhones.Font = new Font("Arial", 8.25f);
            this.txtPhones.Location = new Point(0x7b, 0x7f);
            this.txtPhones.MaxLength = 0x80;
            this.txtPhones.Name = "txtPhones";
            this.txtPhones.OldValue = null;
            this.txtPhones.Size = new Size(0xf9, 20);
            this.txtPhones.TabIndex = 3;
            this.txtPhones.UserTextLength = AppInstance.TextControlLength.ItemDescription;
            this.txtPhones.UserTrimMode = AppInstance.TextControlTrimMode.All;
//            this.txtPhones.Value = null;//manager.GetObject("txtPhones.Value");
            this.lblPhones.AutoSize = true;
            this.lblPhones.Font = new Font("Arial", 8.25f);
            this.lblPhones.Location = new Point(12, 130);
            this.lblPhones.Name = "lblPhones";
            this.lblPhones.Size = new Size(0x45, 14);
            this.lblPhones.TabIndex = 4;
            this.lblPhones.Text = "Số điện thoại";
            this.gBoxControl3.Controls.Add(this.txtDia_Chi_E);
            this.gBoxControl3.Controls.Add(this.txtTen_Nv_E);
            this.gBoxControl3.Font = new Font("Arial", 8.25f);
            this.gBoxControl3.Location = new Point(410, 0x36);
            this.gBoxControl3.Name = "gBoxControl3";
            this.gBoxControl3.Size = new Size(0x11d, 0x43);
            this.gBoxControl3.TabIndex = 2;
            this.gBoxControl3.TabStop = false;
            this.gBoxControl3.Text = "Tiếng Anh";
            this.txtDia_Chi_E.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.txtDia_Chi_E.CheckTextSearched = false;
            this.txtDia_Chi_E.DisabledForeColor = Color.Empty;
            this.txtDia_Chi_E.Font = new Font("Arial", 8.25f);
            this.txtDia_Chi_E.Location = new Point(6, 0x29);
            this.txtDia_Chi_E.MaxLength = 0x80;
            this.txtDia_Chi_E.Name = "txtDia_Chi_E";
            this.txtDia_Chi_E.OldValue = null;
            this.txtDia_Chi_E.Size = new Size(0x111, 20);
            this.txtDia_Chi_E.TabIndex = 1;
            this.txtDia_Chi_E.UserTextLength = AppInstance.TextControlLength.ItemDescription;
            this.txtDia_Chi_E.UserTrimMode = AppInstance.TextControlTrimMode.All;
//            this.txtDia_Chi_E.Value = null;//manager.GetObject("txtDia_Chi_E.Value");
            this.txtTen_Nv_E.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.txtTen_Nv_E.CheckTextSearched = false;
            this.txtTen_Nv_E.DisabledForeColor = Color.Empty;
            this.txtTen_Nv_E.Font = new Font("Arial", 8.25f);
            this.txtTen_Nv_E.Location = new Point(6, 0x13);
            this.txtTen_Nv_E.MaxLength = 0x80;
            this.txtTen_Nv_E.Name = "txtTen_Nv_E";
            this.txtTen_Nv_E.OldValue = null;
            this.txtTen_Nv_E.Size = new Size(0x111, 20);
            this.txtTen_Nv_E.TabIndex = 0;
            this.txtTen_Nv_E.UserTextLength = AppInstance.TextControlLength.ItemDescription;
            this.txtTen_Nv_E.UserTrimMode = AppInstance.TextControlTrimMode.All;
//            this.txtTen_Nv_E.Value = null;//manager.GetObject("txtTen_Nv_E.Value");
            this.lblEmail.AutoSize = true;
            this.lblEmail.Font = new Font("Arial", 8.25f);
            this.lblEmail.Location = new Point(12, 0x98);
            this.lblEmail.Name = "lblEmail";
            this.lblEmail.Size = new Size(0x1f, 14);
            this.lblEmail.TabIndex = 4;
            this.lblEmail.Text = "Email";
            this.txtEmail.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.txtEmail.CheckTextSearched = false;
            this.txtEmail.DisabledForeColor = Color.Empty;
            this.txtEmail.Font = new Font("Arial", 8.25f);
            this.txtEmail.Location = new Point(0x7b, 0x95);
            this.txtEmail.MaxLength = 0x80;
            this.txtEmail.Name = "txtEmail";
            this.txtEmail.OldValue = null;
            this.txtEmail.Size = new Size(0x23c, 20);
            this.txtEmail.TabIndex = 5;
            this.txtEmail.UserTextLength = AppInstance.TextControlLength.ItemDescription;
            this.txtEmail.UserTrimMode = AppInstance.TextControlTrimMode.All;
//            this.txtEmail.Value = null;//manager.GetObject("txtEmail.Value");
            this.lblMa_Bp.AutoSize = true;
            this.lblMa_Bp.Font = new Font("Arial", 8.25f);
            this.lblMa_Bp.Location = new Point(12, 0xae);
            this.lblMa_Bp.Name = "lblMa_Bp";
            this.lblMa_Bp.Size = new Size(0x2f, 14);
            this.lblMa_Bp.TabIndex = 4;
            this.lblMa_Bp.Text = "Bộ phận";
            this.txtMa_Bp.CharacterCasing = CharacterCasing.Upper;
            this.txtMa_Bp.CheckTextSearched = false;
            this.txtMa_Bp.DisabledForeColor = Color.Empty;
            this.txtMa_Bp.FieldDisplay = "Ten_Bp";
            this.txtMa_Bp.FirstFilter = "BP_Cuoi = 'C'";
            this.txtMa_Bp.Font = new Font("Arial", 8.25f);
            this.txtMa_Bp.Location = new Point(0x7b, 0xab);
            this.txtMa_Bp.MaxLength = 0x20;
            this.txtMa_Bp.Name = "txtMa_Bp";
            this.txtMa_Bp.OldValue = null;
            this.txtMa_Bp.Size = new Size(100, 20);
            this.txtMa_Bp.TabIndex = 6;
            this.txtMa_Bp.TableName = "DMBP";
            this.txtMa_Bp.TextDisplay = this.txtTen_Bp;
            this.txtMa_Bp.UserTextLength = AppInstance.TextControlLength.ItemCode;
            this.txtMa_Bp.UserTrimMode = AppInstance.TextControlTrimMode.All;
//            this.txtMa_Bp.Value = null;//manager.GetObject("txtMa_Bp.Value");
            this.txtTen_Bp.BackColor = SystemColors.Control;
            this.txtTen_Bp.BorderStyle = BorderStyle.None;
            this.txtTen_Bp.CheckTextSearched = false;
            this.txtTen_Bp.DisabledForeColor = Color.Blue;
            this.txtTen_Bp.Enabled = false;
            this.txtTen_Bp.Font = new Font("Arial", 8.25f);
            this.txtTen_Bp.ForeColor = Color.Blue;
            this.txtTen_Bp.Location = new Point(0xe5, 0xae);
            this.txtTen_Bp.Name = "txtTen_Bp";
            this.txtTen_Bp.OldValue = null;
            this.txtTen_Bp.Size = new Size(0xe9, 13);
            this.txtTen_Bp.TabIndex = 13;
//            this.txtTen_Bp.Value = null;//manager.GetObject("txtTen_Bp.Value");
            this.txtMobiles.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.txtMobiles.CheckTextSearched = false;
            this.txtMobiles.DisabledForeColor = Color.Empty;
            this.txtMobiles.Font = new Font("Arial", 8.25f);
            this.txtMobiles.Location = new Point(0x1d4, 0x7f);
            this.txtMobiles.MaxLength = 0x80;
            this.txtMobiles.Name = "txtMobiles";
            this.txtMobiles.OldValue = null;
            this.txtMobiles.Size = new Size(0xe3, 20);
            this.txtMobiles.TabIndex = 4;
            this.txtMobiles.UserTextLength = AppInstance.TextControlLength.ItemDescription;
            this.txtMobiles.UserTrimMode = AppInstance.TextControlTrimMode.All;
//            this.txtMobiles.Value = null;//manager.GetObject("txtMobiles.Value");
            this.lblMobiles.AutoSize = true;
            this.lblMobiles.Font = new Font("Arial", 8.25f);
            this.lblMobiles.Location = new Point(0x1a9, 130);
            this.lblMobiles.Name = "lblMobiles";
            this.lblMobiles.Size = new Size(0x25, 14);
            this.lblMobiles.TabIndex = 4;
            this.lblMobiles.Text = "Mobile";
            base.AddTitleText = "Thêm mới nhân viên";
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.ClientSize = new Size(0x2c3, 0x1bd);
            base.Controls.Add(this.lblDia_Chi);
            base.Controls.Add(this.lblTen_Nv);
            base.Controls.Add(this.txtPhones);
            base.Controls.Add(this.lblMa_Nv);
            base.Controls.Add(this.txtMa_Nv);
            base.Controls.Add(this.pnlPicture);
            base.Controls.Add(this.gBoxControl1);
            base.Controls.Add(this.gBoxControl3);
            base.Controls.Add(this.lblPhones);
            base.Controls.Add(this.lblEmail);
            base.Controls.Add(this.txtTen_Bp);
            base.Controls.Add(this.txtMobiles);
            base.Controls.Add(this.txtMa_Bp);
            base.Controls.Add(this.txtEmail);
            base.Controls.Add(this.lblMa_Bp);
            base.Controls.Add(this.lblMobiles);
            base.EditTitleText = "Sửa nhân viên";
            base.FirstFreeCode = "ST1";
            base.Name = "FormDmNvEditor";
            base.SecondFreeCode = "ST2";
            this.Text = "Thêm mới nhân viên";
            base.ThirdFreeCode = "ST3";
            base.Controls.SetChildIndex(this.lblMobiles, 0);
            base.Controls.SetChildIndex(this.lblMa_Bp, 0);
            base.Controls.SetChildIndex(this.txtEmail, 0);
            base.Controls.SetChildIndex(this.txtMa_Bp, 0);
            base.Controls.SetChildIndex(this.txtMobiles, 0);
            base.Controls.SetChildIndex(this.txtTen_Bp, 0);
            base.Controls.SetChildIndex(this.lblEmail, 0);
            base.Controls.SetChildIndex(this.lblPhones, 0);
            base.Controls.SetChildIndex(this.gBoxControl3, 0);
            base.Controls.SetChildIndex(this.gBoxControl1, 0);
            base.Controls.SetChildIndex(this.pnlPicture, 0);
            base.Controls.SetChildIndex(this.txtMa_Nv, 0);
            base.Controls.SetChildIndex(this.lblMa_Nv, 0);
            base.Controls.SetChildIndex(this.txtPhones, 0);
            base.Controls.SetChildIndex(this.lblTen_Nv, 0);
            base.Controls.SetChildIndex(this.lblDia_Chi, 0);
            base.Controls.SetChildIndex(base.lblPhan_Loai, 0);
            base.Controls.SetChildIndex(base.txtMa_Loai1, 0);
            base.Controls.SetChildIndex(base.txtMa_Loai2, 0);
            base.Controls.SetChildIndex(base.txtMa_Loai3, 0);
            this.pnlPicture.ResumeLayout(false);
            ((ISupportInitialize) this.PictureBox).EndInit();
            this.gBoxControl1.ResumeLayout(false);
            this.gBoxControl1.PerformLayout();
            this.gBoxControl3.ResumeLayout(false);
            this.gBoxControl3.PerformLayout();
            base.ResumeLayout(false);
            base.PerformLayout();
        }

        public override bool OnSave()
        {
            DataRow localCurrentRow;
            if (string.IsNullOrEmpty(this.txtMa_Nv.Text))
            {
                MessageBox.Show("Chưa nhập mã nhân viên!", AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return false;
            }
            if (string.IsNullOrEmpty(this.txtTen_Nv.Text))
            {
                MessageBox.Show("Chưa nhập tên nhân viên!", AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return false;
            }
            if (string.IsNullOrEmpty(this.txtMa_Bp.Text))
            {
                MessageBox.Show("Chưa nhập mã bộ phận!", AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return false;
            }
            if (base.NewChecked)
            {
                localCurrentRow = base.LocalTable.NewRow();
            }
            else
            {
                localCurrentRow = base.LocalCurrentRow;
            }
            localCurrentRow["Ma_Nv"] = this.txtMa_Nv.Value;
            localCurrentRow["Ten_Nv"] = this.txtTen_Nv.Value;
            localCurrentRow["Ten_Nv_E"] = this.txtTen_Nv_E.Value;
            localCurrentRow["Dia_Chi"] = this.txtDia_Chi.Value;
            localCurrentRow["Dia_Chi_E"] = this.txtDia_Chi_E.Value;
            localCurrentRow["Phones"] = this.txtPhones.Value;
            localCurrentRow["Mobiles"] = this.txtMobiles.Value;
            localCurrentRow["Email"] = this.txtEmail.Value;
            localCurrentRow["Ma_Bp"] = this.txtMa_Bp.Value;
            localCurrentRow["Ten_Bp"] = this.txtTen_Bp.Value;
            localCurrentRow["Ma_Loai1"] = base.txtMa_Loai1.Value;
            localCurrentRow["Ma_Loai2"] = base.txtMa_Loai2.Value;
            DmNvDataAccess access = new DmNvDataAccess();
            if (base.ShowMessage(localCurrentRow, access.SaveRow(base.NewChecked, localCurrentRow)))
            {
                return false;
            }
            if (base.NewChecked)
            {
                base.LocalTable.Rows.Add(localCurrentRow);
            }
            if (this.ib_PictureChanged)
            {
                SSDataAccess.SetPicture(base.LocalFormLister.LocalTableName, base.LocalFormLister.LocalKeyField, base.LocalCurrentRow[base.LocalFormLister.LocalKeyField], "Image_Name", "Image_Item", this.is_PicturePath);
            }
            base.LocalCurrentRow = localCurrentRow;
            base.LocalTable.AcceptChanges();
            this.txtMa_Nv.Focus();
            return base.OnSave();
        }

        public override void OnShow()
        {
            this.txtMa_Nv.Value = base.LocalCurrentRow["Ma_Nv"];
            this.txtTen_Nv.Value = base.LocalCurrentRow["Ten_Nv"];
            this.txtTen_Nv_E.Value = base.LocalCurrentRow["Ten_Nv_E"];
            this.txtDia_Chi.Value = base.LocalCurrentRow["Dia_Chi"];
            this.txtDia_Chi_E.Value = base.LocalCurrentRow["Dia_Chi_E"];
            this.txtPhones.Value = base.LocalCurrentRow["Phones"];
            this.txtMobiles.Value = base.LocalCurrentRow["Mobiles"];
            this.txtEmail.Value = base.LocalCurrentRow["Email"];
            this.txtMa_Bp.Value = base.LocalCurrentRow["Ma_Bp"];
            this.txtTen_Bp.Value = base.LocalCurrentRow["Ten_Bp"];
            base.txtMa_Loai1.Value = base.LocalCurrentRow["Ma_Loai1"];
            base.txtMa_Loai2.Value = base.LocalCurrentRow["Ma_Loai2"];
            base.txtMa_Loai2.Value = base.LocalCurrentRow["Ma_Loai2"];
            this.PictureBox.Image = SSDataAccess.GetPicture(base.LocalFormLister.LocalTableName, base.LocalFormLister.LocalKeyField, base.LocalCurrentRow[base.LocalFormLister.LocalKeyField], "Image_Name", "Image_Item");
            base.OnShow();
        }

        private void PictureBox_DoubleClick(object sender, EventArgs e)
        {
            this.ib_PictureChanged = true;
            OpenFileDialog dialog = new OpenFileDialog();
            dialog.InitialDirectory = "";
            dialog.Filter = "JPEG (*.jpg;*.jpeg;*.jpe;*.jfif)|*.jpg;*.jpeg;*.jpe;*.jfif|Bitmap files (*.bmp)|*.bmp|GIF (*.gif)|*.gif|TIFF (*.tif;*.tiff)|*.tif;*.tiff|All files (*.*)|*.*";
            dialog.CheckFileExists = true;
            dialog.ShowDialog();
            this.is_PicturePath = dialog.FileName;
            if (!this.is_PicturePath.Equals(string.Empty))
            {
                this.PictureBox.Image = new Bitmap(this.is_PicturePath);
            }
            else
            {
                this.PictureBox.Image = null;
            }
        }
    }
}

